import type { AirModelItem, BaseRepairModelItem, SupportCategoryItem } from './../types/support.d';
import http from "../utils/http";
import type { RentApplyParams } from "../types/rent";
// 获取所有飞机型号
export const postAirModel = () => {
  return http<AirModelItem[]>({
    url: "AirModel/all",
    method: "POST",
  });
};

// 获取基地维修数据
export const postBaseRepairModel = () => {
  return http<BaseRepairModelItem[]>({
    url: "BaseRepair/all",
    method: "POST",
  });
}

// 获取部件大修数据
export const postCompModifyModel = () => {
  return http<any[]>({
    url: "BaseRepair2/all",
    method: "POST",
  });
}

// 获取航线服务数据
export const postAirLineServiceModel = () => {
  return http<any[]>({
    url: "AirLine/table",
    method: "POST",
  });
}


// 获取新的航线服务数据
export const postAirLineTableNew = () => {
  return http<any[]>({
    url: "AirLine/table_new",
    method: "POST",
  });
}


// 获取所有分类列表
export const postSupportCategoryList = () => {
  return http<SupportCategoryItem[]>({
    url: "ArticleType/all",
    method: "POST",
  });
};

// 咨询
export const postSupportApply = (data: RentApplyParams) => {
  return http<any>({
    url: "Technology/create",
    method: "POST",
    data
  });
};
